package com.tontron.system.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

/**
 * 租户表
 * @TableName sys_tenant
 */
@TableName(value ="sys_tenant")
public class SysTenant implements Serializable {
    public static final Integer TENANT_TYPE_SYSTEM = 1; //系统默认
    public static final Integer TENANT_TYPE_CUSTOMER = 2;//普通租户

    public static final Integer TENANT_SATUS_NORMAL = 0;//正常

    private static final Integer TENANT_STATUS_DISABLED = 2;//停用

    /**
     * 租户ID
     */
    @TableId(value = "tenant_id")
    private Long tenantId;

    /**
     * 租户名称
     */
    @TableField(value = "tenant_name")
    private String tenantName;

    /**
     * 租户简称
     */
    @TableField(value = "tenant_short_name")
    private String tenantShortName;

    /**
     * 租户类型，1，系统默认，2,普通
     */
    @TableField(value = "tenant_type")
    private Integer tenantType;

    /**
     * 联系人
     */
    @TableField(value = "contacts")
    private String contacts;

    /**
     * 地址
     */
    @TableField(value = "address")
    private String address;

    /**
     * 电话
     */
    @TableField(value = "telphone")
    private String telphone;

    /**
     * 帐号状态（0正常 1停用）
     */
    @TableField(value = "status")
    private String status;

    /**
     * 删除标志（0代表存在 2代表删除）
     */

    @TableField(value = "del_flag")
    @TableLogic
    private String delFlag;

    /**
     * 创建者
     */
    @TableField(value = "create_by")
    private String createBy;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 更新者
     */
    @TableField(value = "update_by")
    private String updateBy;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private Date updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 租户ID
     */
    public Long getTenantId() {
        return tenantId;
    }

    /**
     * 租户ID
     */
    public void setTenantId(Long tenantId) {
        this.tenantId = tenantId;
    }

    /**
     * 租户名称
     */
    public String getTenantName() {
        return tenantName;
    }

    /**
     * 租户名称
     */
    public void setTenantName(String tenantName) {
        this.tenantName = tenantName;
    }

    /**
     * 租户简称
     */
    public String getTenantShortName() {
        return tenantShortName;
    }

    /**
     * 租户简称
     */
    public void setTenantShortName(String tenantShortName) {
        this.tenantShortName = tenantShortName;
    }

    /**
     * 租户类型，1，系统默认，2,普通
     */
    public Integer getTenantType() {
        return tenantType;
    }

    /**
     * 租户类型，1，系统默认，2,普通
     */
    public void setTenantType(Integer tenantType) {
        this.tenantType = tenantType;
    }

    /**
     * 联系人
     */
    public String getContacts() {
        return contacts;
    }

    /**
     * 联系人
     */
    public void setContacts(String contacts) {
        this.contacts = contacts;
    }

    /**
     * 地址
     */
    public String getAddress() {
        return address;
    }

    /**
     * 地址
     */
    public void setAddress(String address) {
        this.address = address;
    }

    /**
     * 电话
     */
    public String getTelphone() {
        return telphone;
    }

    /**
     * 电话
     */
    public void setTelphone(String telphone) {
        this.telphone = telphone;
    }

    /**
     * 帐号状态（0正常 1停用）
     */
    public String getStatus() {
        return status;
    }

    /**
     * 帐号状态（0正常 1停用）
     */
    public void setStatus(String status) {
        this.status = status;
    }

    /**
     * 删除标志（0代表存在 2代表删除）
     */
    public String getDelFlag() {
        return delFlag;
    }

    /**
     * 删除标志（0代表存在 2代表删除）
     */
    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    /**
     * 创建者
     */
    public String getCreateBy() {
        return createBy;
    }

    /**
     * 创建者
     */
    public void setCreateBy(String create_by) {
        this.createBy = createBy;
    }

    /**
     * 创建时间
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 创建时间
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 更新者
     */
    public String getUpdateBy() {
        return updateBy;
    }

    /**
     * 更新者
     */
    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    /**
     * 更新时间
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * 更新时间
     */
    public void setUpdate_time(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SysTenant other = (SysTenant) that;
        return (this.getTenantId() == null ? other.getTenantId() == null : this.getTenantId().equals(other.getTenantId()))
            && (this.getTenantName() == null ? other.getTenantName() == null : this.getTenantName().equals(other.getTenantName()))
            && (this.getTenantShortName() == null ? other.getTenantShortName() == null : this.getTenantShortName().equals(other.getTenantShortName()))
            && (this.getTenantType() == null ? other.getTenantType() == null : this.getTenantType().equals(other.getTenantType()))
            && (this.getContacts() == null ? other.getContacts() == null : this.getContacts().equals(other.getContacts()))
            && (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()))
            && (this.getTelphone() == null ? other.getTelphone() == null : this.getTelphone().equals(other.getTelphone()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getDelFlag() == null ? other.getDelFlag() == null : this.getDelFlag().equals(other.getDelFlag()))
            && (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getTenantId() == null) ? 0 : getTenantId().hashCode());
        result = prime * result + ((getTenantName() == null) ? 0 : getTenantName().hashCode());
        result = prime * result + ((getTenantShortName() == null) ? 0 : getTenantShortName().hashCode());
        result = prime * result + ((getTenantType() == null) ? 0 : getTenantType().hashCode());
        result = prime * result + ((getContacts() == null) ? 0 : getContacts().hashCode());
        result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
        result = prime * result + ((getTelphone() == null) ? 0 : getTelphone().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getDelFlag() == null) ? 0 : getDelFlag().hashCode());
        result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", tenantId=").append(tenantId);
        sb.append(", tenantName=").append(tenantName);
        sb.append(", tenantShortName=").append(tenantShortName);
        sb.append(", tenantType=").append(tenantType);
        sb.append(", contacts=").append(contacts);
        sb.append(", address=").append(address);
        sb.append(", telphone=").append(telphone);
        sb.append(", status=").append(status);
        sb.append(", del_flag=").append(delFlag);
        sb.append(", create_by=").append(createBy);
        sb.append(", create_time=").append(createTime);
        sb.append(", update_by=").append(updateBy);
        sb.append(", update_time=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
